import Flutter
import UIKit

@main
@objc class AppDelegate: FlutterAppDelegate {
    override func application(
        _ application: UIApplication,
        didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
      ) -> Bool {
          let controller: FlutterViewController = window?.rootViewController as! FlutterViewController
          let factory = NativeTextViewFactory(messenger: controller.binaryMessenger)
          registrar(forPlugin: "native-text-view")?.register(factory, withId: "native-text-view")

        return super.application(application, didFinishLaunchingWithOptions: launchOptions)
      }
}
